let instance = new class {
    constructor(name,age) {
        this.name = name;
        this.age = age;
    }
    sayHi() {
        console.log(`hi,i am ${this.name}`);
    }
}('daxia',18);

console.log(instance);
instance.sayHi();

let instance1 = new (function(name,age) {
    this.name = name;
    this.age = age;
})('daxia',19)

console.log(instance1);